from tkinter import *

x = int(input())
y = int(input())
N = int(input())

root = Tk()
root.title("ИТ-марафон")
root.geometry("500x500")

coords = [0 * N + x,0 * N + y,
          10 * N + x,0 * N + y,
          10 * N + x,10 * N + y,
          20 * N + x,10 * N + y,
          20 * N + x,20 * N + y,
          10 * N + x,20 * N + y,
          10 * N + x,30 * N + y,
          0 * N + x,30 * N + y]

if N == 0 and x >= 0 and y >= 0 and x <= 500 and y <= 500:
    pass
else:
    if N > 0 and 0*N >=0 and 20*N+x < 500 and 30 * N + y < 500:
        pass
    else:
        if N < 0 and 0*N >=0 and 20*N+x < 500 and 30 * N + y < 500:
            pass
        else:
            print('вышли за пределы')
            exit()
    
canvas = Canvas(bg = "white" , width = 500, height = 500)
canvas.pack(anchor = CENTER, expand = 1)
canvas.create_polygon(coords)

root.mainloop()


